﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>校园e网通-统计</title>
    <script src="assets/js/jquery-1.10.2.js"></script>
    <!-- Bootstrap Styles-->
    <script src="assets/js/bootstrap.min.js"></script>
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FontAwesome Styles-->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
    <!-- Morris Chart Styles-->
    <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
    <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet" />
    <!-- Google Fonts-->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
    <link rel="stylesheet" href="assets/js/Lightweight-Chart/cssCharts.css">
    <style type="text/css">
    #msg{
    height: 4rem;
    text-align: center;
    position: fixed;
    top: 20%;
    margin-top: -1rem;
    line-height: 4rem;
    width: 100%;
    }
    #msg span{
    color: #fff;
    background: rgba(0,0,0,0.6);
    height: 4rem;
    display: inline-block;
    padding: 0 3rem;
    border-radius: 5px;
    }
    </style>
    

    <script type="text/javascript">
    
    
       var s="all";
       var currentPageno =1 ;
        $(function() {
        	
        	function alert(e){
                $("body").append("<div id='msg'><span>"+e+"</span></div>");
                clearmsg();
            }
            function clearmsg(){
                var t = setTimeout(function(){
                    $("#msg").remove();
                },2000)
            };
            
            getName();
        	
        	getMenu();
        	$("#tubiao").load("onexiaofei.html");
        	
        
        	
            <!-- 保存按钮点击事件-->
            $("button[name='save']").click(function(){
                alert("保存成功");
                location.reload();
            });
        });
function getName(){
        	
        	$.ajax({
        		url:'getname.action',
        		type: "post",
        		async: false,
        		dataType: 'json',
                success: function (data) {
                	
                	$("#PICname").val(data.sid);
                	
                	$("#userName").html(data.sname);
                	
                	
                }
        		
        	})
        }
        function getMenu(){
            
      	  $.ajax({
      		type:"get",
      		url:"/ENetcom/menu/getMenuTreeByRole.action",
      		data:{
      			user:$("#PICname").val()
      		},
      		async: false,
      		contentType:"application/json;charset=utf-8",
      		dataType:'json',
      		
      		
      		success:function(data){
      	       var str = '' ;
      	       
      	       str += '<nav class="navbar-default navbar-side" role="navigation"><div class="sidebar-collapse">';
      	       str += '<ul class="nav" id="main-menu"><li id="addMenu">';
      	       str += '<a href="index.html"><i class="fa fa-home"></i> 首页</a></li>';
      	       
      	       
      			$.each(data,function(index,menuTree){
      				str += '<li><a href="#"><i class="fa fa-sitemap"></i>'+menuTree.text+'<span class="fa arrow"></span></a>' ;
      				str += '<ul class="nav nav-second-level">';
      				$.each(menuTree.children,function(index,menu){
          				str += '<li><a href="'+menu.url+'">'+menu.text+'</a></li>' ;
          			})
          			str += '</ul></li>';
      			})
      			
      	
      			
      			str += '<li><a href="analysis2.html"><i class="fa fa-bar-chart-o"></i> 统计分析</a>';
      			str += '</li></ul></div></nav>';
      			
      			$('#addMenu').html(str);

      		
      			
      		}
      	});
      }
        function byebye(){
    		$.ajax({
    			url:'byebye.action',
    			type:'post',
    			success:function(data){
    				location.reload();
    			}
    		})
    	}
        
        
      
    </script>

</head>

<body>
    <div id="wrapper">
        <nav class="navbar navbar-default top-navbar" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                    <a class="navbar-brand" href="index.html"><strong>校园e网通</strong></a>

		<div id="sideNav" href=""><i class="fa fa-caret-right"></i></div>
            </div>

            <ul class="nav navbar-top-links navbar-right">

                <!-- /.dropdown -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                        <i class="fa fa-bell fa-fw"></i> 通知&nbsp;<i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-alerts">
                        <li>
                            <a class="text-center" href="#">
                                <div>
                                    <i class="fa fa-tasks fa-fw"></i> 共有4条新消息

                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> 新消息
                                    <span class="pull-right text-muted small">5 min 前</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> 新消息
                                    <span class="pull-right text-muted small">6 min 前</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> 新消息
                                    <span class="pull-right text-muted small">7 min 前</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> 新消息
                                    <span class="pull-right text-muted small">8 min 前</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>查看所有消息</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                    <!-- /.dropdown-alerts -->
                </li>
                <!-- /.dropdown -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                        <i class="fa fa-user fa-fw"></i>
                        <input type="hidden" id="PICname"  readonly/>
                        <span id="userName"></span>
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li><a href="#" data-toggle="modal" data-target="#information"><i class="fa fa-user fa-fw"></i> 个人信息</a>
                        </li>
                        <li class="divider"></li>
                        <li><a href="#"><i class="fa fa-gear fa-fw"></i> 个性化首页</a>
                        </li>
                        <li class="divider"></li>
                        <li><a href="#" data-toggle="modal" data-target="#out"><i class="fa fa-sign-out fa-fw"></i> 安全退出</a>
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
        </nav>
        <!--个人信息-->
        <div class="modal fade" id="information" tabindex="-1" role="dialog" aria-labelledby="informationLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="informationLabel">
                            编辑信息
                        </h4>
                    </div>
                    <div class="modal-body text-center">

                        <form class="bs-example bs-example-form" role="form">
                            <div class="input-group">
                                <span class="input-group-addon">姓名：</span>
                                <input type="text" class="form-control" placeholder="张三">
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">邮箱：</span>
                                <input type="text" class="form-control" placeholder="123456879@qq.com">
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">部门：</span>
                                <input type="text" class="form-control" placeholder="销售部门" disabled="disabled">
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">职务：</span>
                                <input type="text" class="form-control" placeholder="部门经理">
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">性别：</span>
                                <input type="radio" class="" value="0" name="sex">男
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="radio" class="" value="1" name="sex">女
                            </div>
                            <br>
                            <div class="input-group">
                                <span class="input-group-addon">头像：</span>
                                <input type="file" class="form-control">
                            </div>
                        </form>

                    </div>
                    <div class="modal-footer">

                        <button type="button" class="btn btn-primary" name="save">
                            保存
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>

        <!--安全退出-->
        <div class="modal fade" id="out" tabindex="-1" role="dialog" aria-labelledby="outLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="outLabel">
                            确定要退出吗？
                        </h4>
                    </div>
                    <div class="modal-body">
                        &nbsp;
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                        <button type="button" class="btn btn-primary" onclick="byebye()">
                            安全退出
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal -->
        </div>
        <!--/. NAV TOP  -->
        <div id="addMenu"></div>
        <!-- /. NAV SIDE  -->

		<div id="page-wrapper">
		  <div class="header">
                        <h1 class="page-header">
                                                                          统计分析 
                        </h1>
						<ol class="breadcrumb" >
					  <li><a href="index.html">校园e网通</a></li>
					  
					  <li class="active">个人消费统计分析 </li>
					</ol>

          </div>
            
            <div id="page-inner" class="container">

                <div class="row clearfix">
                    <div class="col-md-2 column">
                        <br/>
                        <h3 class="page-header" >
                            统计类型
                        </h3>
                        <div class="panel-group" id="panel-1">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <a class="panel-title" data-toggle="collapse" data-parent="#panel-1" href="#panel-element-11">余额信息</a>
                                </div>
                                <div id="panel-element-11" class="panel-collapse collapse in">
                                    <div class="panel-body" style="cursor: pointer">
                                       个人消费
                                    </div>
                                    
                                </div>

                            </div>
                            </div>
                            </div>
                    </div>
                    <br>
                    <div class="col-md-10 column">
                        <h3 class="page-header"  >
                            统计图表
                        </h3>
                        <!--数据（从数据库中读取）-->
                        <div id="tubiao"></div>
                        
                    </div>
                </div>
				<footer>

                    <br/><br/><br/>

                    <p style="text-align: center">Copyright &copy; 2018.蓝桥中北二班第四组 All rights reserved.</p>


				</footer>
            </div>
            <!-- /. PAGE INNER  -->
        </div>
        <!-- /. PAGE WRAPPER  -->
    </div>
    <!-- /. WRAPPER  -->
    <!-- JS Scripts-->

    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
    <!-- Morris Chart Js -->
    <script src="assets/js/morris/raphael-2.1.0.min.js"></script>
    <script src="assets/js/morris/morris.js"></script>


	<script src="assets/js/easypiechart.js"></script>
	<script src="assets/js/easypiechart-data.js"></script>

	 <script src="assets/js/Lightweight-Chart/jquery.chart.js"></script>
	
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>


</body>

</html>